HEX
Server: Apache/2.4.18 (Ubuntu)
System: Linux phubuntu06.apexhosting.com 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
User: master06 (1000)
PHP: 7.0.33-0ubuntu0.16.04.16
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
Upload Files
File: //proc/12461/task/12461/cwd/plugins/jetpack-boost-git/app/data-sync/Mergeable_Array_Entry.php
<?php

namespace Automattic\Jetpack_Boost\Data_Sync;

use Automattic\Jetpack\WP_JS_Data_Sync\Contracts\Entry_Can_Get;
use Automattic\Jetpack\WP_JS_Data_Sync\Contracts\Entry_Can_Merge;

class Mergeable_Array_Entry implements Entry_Can_Get, Entry_Can_Merge {
	private $option_key;

	public function __construct( $option_key ) {
		$this->option_key = $option_key;
	}

	public function get( $fallback_value = false ) {
		// WordPress looks at argument count to figure out if a fallback value was used.
		// Only provide the fallback value if it's not the default ( false ).
		if ( $fallback_value !== false ) {
			return get_option( $this->option_key, $fallback_value );
		}
		return get_option( $this->option_key );
	}

	public function set( $value ) {
		update_option( $this->option_key, $value, false );
	}

	public function merge( $value, $partial_value ) {
		return array_merge( $value, $partial_value );
	}
}